// 用人申请接口地址
import request from "@/utils/request";

// 查人
export function seachPersonList(data) {
  return request({
    url: "/system/role/getUserByroleCode",
    method: "POST",
    data,
  });
}
// 新增用人申请
export function newNeedWorkers(data) {
  return request({
    url: "/system/demand/add",
    method: "POST",
    data,
  });
}
// 用人申请列表
export function needWorkersList(data) {
  return request({
    url: `/system/demand/list?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: "POST",
    data,
  });
}
// -获取招聘需求表详细信息
export function needWorkersView(id) {
  return request({
    url: `/system/demand/${id}`,
    method: "get",
  });
}
// -获取删除用人申请
export function deleteNeedWorkers(id) {
  return request({
    url: `/system/demand/deleteById/${id}`,
    method: "get",
  });
}
// 岗位信息库
export function getNeedWorksList(params) {
  return request({
    // url: "/system/info/list",
    url:"/job/info/pageList",
    method: "get",
    params
  })
}
// 用人申请审批
export function approveApi(data,url) {
  return request({
    url: `${url}`,
    method: "post",
    data,
  })
}
// 按钮角色权限 /flowable/definition/getPermession/{flowKey}

export function isRoleBtn(params) {
  return request({
    url: `/flowable/definition/getPermession/${params}`,
    method: "get",
  })
}